from selenium import webdriver
import time

from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait

web = webdriver.Chrome()
web.maximize_window()
web.get("https://www.taobao.com/")
web.find_element(By.PARTIAL_LINK_TEXT, "亲，请登录").click()
#web.find_element(By.ID, "fm-login-id").send_keys("hu675522")
#web.find_element(By.ID, "fm-login-password").send_keys("long675522")



web.find_element(By.PARTIAL_LINK_TEXT, "微博登录").click()
time.sleep(1)
web.back()
web.back()
time.sleep(1)
web.find_element(By.CSS_SELECTOR, ".search-combobox-input").send_keys("乐视pro3手机壳")
web.find_element(By.CSS_SELECTOR, ".btn-search").click()
time.sleep(1)
web.find_element(By.CSS_SELECTOR, ".J_Ajax link  ").click()
js = "window.scrollTo(0,  1000)"
web.execute_script(js)

time.sleep(3)
web.quit()